<?php
/**
 * @fileoverview    feed页翻页接口
 * @author          xinhua
 * @date            Feb  02 11:31:49 CST 2012
 * @copyright       sina meila
 */

include_once '../../__global.php';
include_once './scroll_public.php';
class aj_scrollFeed extends scroll_public{

    public function main(){

        $nickname=$this->__visitor['nickname'];

        $feedModle=new ml_model_dbUserfeed();

        $data=$feedModle->getfeedByUid($this->_uid,$this->_begin,ML_FEED_PAGESIZE);//第一个数据页数，第二个offset，第三个参数数据类型

        $total=$feedModle->getCountByUid($this->_uid);
         
         
        $htmlModel=new ml_biz_feed_user();
        $data=$htmlModel->output($data, $this->__visitor['uid']);

        $last=count($data)<ML_FEED_PAGESIZE?true:false;
        $finnal['lastSegment']=$last;
        $finnal['items']=$data;

        $this->api_output(ML_RCODE_SUCC,$finnal);

    }
}
new aj_scrollFeed();
?>